layout(location=0) in vec3 in_pos;
//in vec4 color;
layout(location=1) in vec3 in_normal;
layout(location=2) in vec4 in_color;
layout(location=3) in vec2 in_uv;

out vec4 out_color;
out vec2 out_uv;
out vec3 out_normal;
out vec3 out_eye_pos;

void main()
{
	float4 world_pos=world_mtx*vec4(in_pos,1);
	gl_Position=viewproj_mtx*world_pos;
	out_uv=in_uv;
	out_color=in_color;
//	out_normal=normalize(in_normal);
	out_normal=normalize(float3x3(world_mtx)*in_normal);
	out_eye_pos=world_pos.xyz-cam_mtx[3].xyz;
}